{include file="public/header" /}
<body>
<div class="header order-hd-bgc">
    <i class="layui-icon layui-icon-left"></i> 订单详情
</div>

<div class="order-det-status">
    <p>{$info.friendlyText}</p>
</div>



<div class="submit-pro-list bgc" style="margin: 0.625rem 0;padding: 0 0.9375rem;">
    <ul class="my-order-pro">
        {foreach name="info.productsField" item="vo"}

        <li style="border-bottom: inherit">
            <p class="flex-center">
                <img src="{$vo.icon}" alt=""></p>
            <div><p>{$vo.title}</p>
                <p class="price">￥<span>{$vo.vip_price}</span></p></div>
            <p style="display: flex;align-items: center;justify-content: center">x{$vo.num}</p>
        </li>

        {/foreach}
    </ul>
    <ul class="submit-form-list">
        <li style="border-bottom: inherit;display: flex;justify-content: space-between">订单备注
            <p>{$vo.remark?:''}</p>
        </li>
        <li class="real-money" style="border-bottom: inherit;align-items:center;display: flex;justify-content: space-between">实付款<span style="color: red;font-size: 1rem;font-weight: bold">￥{$info.real_amount}</span></li>
    </ul>
</div>

<ul class="order-det-form bgc">
    <li>订单编号
        <p>{$info.sn}</p>
    </li>
    <li>下单时间
        <p>{$info.create_time}</p>
    </li>
    {if $info.statusCode > 1}

    <li>付款时间
        <p>{$info.pay_time}</p>
    </li>
    {/if}

    {if $info.statusCode > 2}
    <li>发货时间
        <p>{$info.post_time}</p>
    </li>


    {/if}
    {if $info.statusCode > 3}
    <li>收货时间
        <p>{$info.receipt_time}</p>
    </li>
    {/if}
</ul>

<div class="orderDet-footer">
    {if $info.statusCode == 1}
    <p class="flex-center clear">取消订单</p>
    <p class="flex-center bc" onclick="load_href('{:url(\'order/payment\')}?id={$info.id}',2)">立即付款</p>
    {/if}
    {if $info.statusCode == 3}
    <p class="flex-center bc edit receipt">确认收货</p>
    {/if}
</div>

</body>
{include file="public/footer"/}
<script>
    $(".clear").click(function () {
        edit('clear', '确认要取消订单吗？')
    })
    $(".receipt").click(function () {
        edit('receipt', '是否确认收货？')
    })

    function edit(type, msg) {
        layer.confirm(msg, {title: '请确认'}, function () {
            return common.request('{:url("order/edit")}', {type: type, id: '{$info.id}'});
        });
    }
</script>
</html>